package com.uniview.service.impl;

import com.uniview.dao.OrderLastRegionDao;
import com.uniview.entity.po.OrderLastRegion;
import com.uniview.service.ServiceOrderLastRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("serviceOrderLastRegionService")
public class ServiceOrderLastRegionServiceImpl implements ServiceOrderLastRegionService {

    @Autowired
    OrderLastRegionDao lastRegionDao;

    @Override
    public void saveRegion(OrderLastRegion orderLastRegion) {
        try {
            lastRegionDao.saveRegion(orderLastRegion);
        }catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void updateRegion(OrderLastRegion orderLastRegion) {
        try {
            lastRegionDao.updateRegion(orderLastRegion);
        }catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public OrderLastRegion findByCreatorNo(String creator) {
        try {
            return lastRegionDao.findByCreator(creator);
        }catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
